package com.ruoyi.biz.letter.domain;

import cn.hutool.crypto.SecureUtil;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.biz.letter.read.CaseTypeConverter;
import com.ruoyi.biz.letter.read.CityPurposeConverter;
import com.ruoyi.biz.letter.read.ReasonableConverter;
import com.ruoyi.biz.letter.read.YesOrNoConverter;
import com.ruoyi.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;
import java.util.List;

/**
 * 地市信访对象 biz_city_letter
 *
 * @author Fei.Cong
 * @date 2024-07-12
 */
@TableName(value = "biz_city_letter")
public class BizCityLetter extends CategoryBase {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelIgnore
    private Long id;

    @TableField(exist = false)
    @ExcelIgnore
    private String exportType;

    /**
     * 信件编号
     */
    @ExcelProperty("信访件编号")
    private String letterNumber;

    /**
     * 类别,1-初访，2-超级访,初访，3-超级访,集体访,初访
     */
    @ExcelProperty(value = "类别")
    private String caseType;

    /**
     * 信件标题
     */
    @ExcelProperty("标题")
    private String letterTitle;

    /**
     * 登记机构
     */
    @ExcelProperty("登记机构")
    private String signDept;

    /**
     * 登记时间
     */
    @ExcelProperty("登记时间")
    private Date letterTime;

    /**
     * 信访人姓名
     */
    @ExcelProperty("姓名")
    private String letterUsername;

    /**
     * 信访人手机号
     */
    @ExcelProperty("手机号")
    private String letterPhone;

    /**
     * 重访次数
     */
    @ExcelProperty("重访次数")
    private Integer repeatVisit;

    /**
     * 是否初访,1-是，0-否
     */
    @ExcelProperty(value = "初访", converter = YesOrNoConverter.class)
    private String isVisit;

    @ExcelProperty(value = "是否有理", converter = ReasonableConverter.class)
    private String isReasonable;

    @ExcelProperty(value = "是否化解", converter = YesOrNoConverter.class)
    private String isSolve;

    @ExcelProperty(value = "是否办结", converter = YesOrNoConverter.class)
    private String isFinish;

    @ExcelProperty(value = "是否涉法涉诉", converter = YesOrNoConverter.class)
    private String isLaw;

    @ExcelIgnore
    private String isRepeatClaim;

    /**
     * 信访目的,1-检举控告,2-建议意见，3-其它，4-申述求决_求决，5-申述求决_申述
     */
    @ExcelProperty(value = "信访目的", converter = CityPurposeConverter.class)
    private String letterPurpose;

    /**
     * 内容分类
     */
    @ExcelProperty("内容分类")
    private String letterCategory;

    /**
     * 问题属地
     */
    @ExcelProperty("问题属地")
    private String ownerArea;

    /**
     * 涉及机构
     */
    @ExcelProperty("涉及机构")
    private String referDept;

    /**
     * 投诉内容
     */
    @ExcelProperty("投诉内容")
    private String letterContent;

    /**
     * 概况信息
     */
    @ExcelProperty("概况信息")
    private String letterInfo;

    /**
     * 信访备注
     */
    @ExcelProperty("备注")
    private String letterRemark;

    /**
     * 台账月份
     */
    @ExcelIgnore
    private String billMonth;

    @TableField(exist = false)
    @ExcelIgnore
    private List<String> billMonths;

    /**
     * 认领部门
     */
    @TableField(exist = false)
    private String area;

    /**
     * 部门id
     */
    @ExcelIgnore
    private Long deptId;

    @TableField(exist = false)
    private String deptName;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @ExcelIgnore
    private String delFlag;

    @ExcelIgnore
    private String status;

    @ExcelIgnore
    private String md5;

    /**
     * 创建者
     */
    @ExcelIgnore
    private String claimBy;

    /**
     * 创建时间
     */
    @ExcelIgnore
    private Date claimTime;

    /**
     * 创建者
     */
    @ExcelIgnore
    private String dispatchBy;

    @ExcelIgnore
    private Date dispatchTime;

    @TableField(exist = false)
    private List<String> statusList;

    @TableField(exist = false)
    private List<Long> deptIdList;
    @ExcelIgnore
    @TableField(exist = false)
    private String beginDate;
    @ExcelIgnore
    @TableField(exist = false)
    private String endDate;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setLetterNumber(String letterNumber) {
        this.letterNumber = letterNumber;
    }

    public String getLetterNumber() {
        return letterNumber;
    }

    public void setCaseType(String caseType) {
        this.caseType = caseType;
    }

    public String getCaseType() {
        return caseType;
    }

    public void setLetterTitle(String letterTitle) {
        this.letterTitle = letterTitle;
    }

    public String getLetterTitle() {
        return letterTitle;
    }

    public Date getLetterTime() {
        return letterTime;
    }

    public void setLetterTime(Date letterTime) {
        this.letterTime = letterTime;
    }

    public String getLetterUsername() {
        return letterUsername;
    }

    public void setLetterPhone(String letterPhone) {
        this.letterPhone = letterPhone;
    }

    public String getLetterPhone() {
        return letterPhone;
    }

    public Integer getRepeatVisit() {
        return repeatVisit;
    }

    public void setRepeatVisit(Integer repeatVisit) {
        this.repeatVisit = repeatVisit;
    }

    public void setIsVisit(String isVisit) {
        this.isVisit = isVisit;
    }

    public String getIsVisit() {
        return isVisit;
    }

    public void setLetterPurpose(String letterPurpose) {
        this.letterPurpose = letterPurpose;
    }

    public String getLetterPurpose() {
        return letterPurpose;
    }

    public void setLetterCategory(String letterCategory) {
        this.letterCategory = letterCategory;
    }

    public String getLetterCategory() {
        return letterCategory;
    }

    public void setOwnerArea(String ownerArea) {
        this.ownerArea = ownerArea;
    }

    public String getOwnerArea() {
        return ownerArea;
    }

    public void setReferDept(String referDept) {
        this.referDept = referDept;
    }

    public String getReferDept() {
        return referDept;
    }

    public void setLetterContent(String letterContent) {
        this.letterContent = letterContent;
    }

    public String getLetterContent() {
        return letterContent;
    }

    public void setLetterInfo(String letterInfo) {
        this.letterInfo = letterInfo;
    }

    public String getLetterInfo() {
        return letterInfo;
    }

    public void setLetterRemark(String letterRemark) {
        this.letterRemark = letterRemark;
    }

    public String getLetterRemark() {
        return letterRemark;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setLetterUsername(String letterUsername) {
        this.letterUsername = letterUsername;
    }


    public String getBillMonth() {
        return billMonth;
    }

    public void setBillMonth(String billMonth) {
        this.billMonth = billMonth;
    }

    public String getMd5() {
        return SecureUtil.md5(letterNumber);
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getIsReasonable() {
        return isReasonable;
    }

    public void setIsReasonable(String isReasonable) {
        this.isReasonable = isReasonable;
    }

    public String getIsSolve() {
        return isSolve;
    }

    public void setIsSolve(String isSolve) {
        this.isSolve = isSolve;
    }

    public String getIsFinish() {
        return isFinish;
    }

    public void setIsFinish(String isFinish) {
        this.isFinish = isFinish;
    }

    public String getExportType() {
        return exportType;
    }

    public void setExportType(String exportType) {
        this.exportType = exportType;
    }

    public String getClaimBy() {
        return claimBy;
    }

    public void setClaimBy(String claimBy) {
        this.claimBy = claimBy;
    }

    public Date getClaimTime() {
        return claimTime;
    }

    public void setClaimTime(Date claimTime) {
        this.claimTime = claimTime;
    }

    public String getIsRepeatClaim() {
        return isRepeatClaim;
    }

    public void setIsRepeatClaim(String isRepeatClaim) {
        this.isRepeatClaim = isRepeatClaim;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<String> getStatusList() {
        return statusList;
    }

    public void setStatusList(List<String> statusList) {
        this.statusList = statusList;
    }

    public String getSignDept() {
        return signDept;
    }

    public void setSignDept(String signDept) {
        this.signDept = signDept;
    }

    public List<Long> getDeptIdList() {
        return deptIdList;
    }

    public void setDeptIdList(List<Long> deptIdList) {
        this.deptIdList = deptIdList;
    }

    public Date getDispatchTime() {
        return dispatchTime;
    }

    public void setDispatchTime(Date dispatchTime) {
        this.dispatchTime = dispatchTime;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getDispatchBy() {
        return dispatchBy;
    }

    public void setDispatchBy(String dispatchBy) {
        this.dispatchBy = dispatchBy;
    }

    public List<String> getBillMonths() {
        return billMonths;
    }

    public void setBillMonths(List<String> billMonths) {
        this.billMonths = billMonths;
    }

    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getIsLaw() {
        return isLaw;
    }

    public void setIsLaw(String isLaw) {
        this.isLaw = isLaw;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("letterNumber", getLetterNumber())
                .append("caseType", getCaseType())
                .append("letterTitle", getLetterTitle())
                .append("acceptDept", getAcceptDept())
                .append("letterTime", getLetterTime())
                .append("letterUsername", getLetterUsername())
                .append("letterPhone", getLetterPhone())
                .append("repeatVisit", getRepeatVisit())
                .append("isVisit", getIsVisit())
                .append("letterPurpose", getLetterPurpose())
                .append("letterCategory", getLetterCategory())
                .append("ownerArea", getOwnerArea())
                .append("referDept", getReferDept())
                .append("letterContent", getLetterContent())
                .append("letterInfo", getLetterInfo())
                .append("letterRemark", getLetterRemark())
                .append("deptId", getDeptId())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
